<TestCase testName="Test_18_EntLibDBExecuteNonQuery">
	<TestSetup>
	</TestSetup>
	
	<TestExecution>
    <TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.EntLibDBExecuteNonQueryStep">
      <DelayBeforeExecution>0</DelayBeforeExecution>
      <ConfigFileLocation>..\..\Config\db.config</ConfigFileLocation>
      <DatabaseConfigName>AdventureWorks</DatabaseConfigName>
      <SQLQuery>
        <RawSQLQuery>UPDATE [AdventureWorks].[Person].[Address] SET AddressLine1 = '{0}' WHERE AddressId={1}</RawSQLQuery>
        <SQLQueryParams>
			<SQLQueryParam>Test Address</SQLQueryParam>
			<SQLQueryParam>1</SQLQueryParam>
        </SQLQueryParams>
      </SQLQuery>
      </TestStep>
      <TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.EntLibDBQueryStep">
      <DelayBeforeCheck>0</DelayBeforeCheck>
      <ConfigFileLocation>..\..\Config\db.config</ConfigFileLocation>
      <DatabaseConfigName>AdventureWorks</DatabaseConfigName>
      
      <!-- 
			The SQL Query to execute is built by formatting the RawSQLQuery substituting in the 
			SQLQueryParam's
			-->
      <SQLQuery>
        <RawSQLQuery>select * from [AdventureWorks].[Person].[Address] where AddressID= '{0}'</RawSQLQuery>
        <SQLQueryParams>
          <!--					<SQLQueryParam takeFromCtx="EventId">Northwoods Cranberry Sauce</SQLQueryParam> -->
          <SQLQueryParam>1</SQLQueryParam>
        </SQLQueryParams>
      </SQLQuery>
      <Rows>
        <Columns>
          <!-- 
				Note: The column names are dependant on the DB schema being checked against.
				Adding the attribute isUnique="true" to one of the columns allows it to be 
				uniquely selcted in the scenario where multiple rows are returned.
				-->
          <AddressID>1</AddressID>
          <AddressLine1>Test Address</AddressLine1>
        </Columns>
      </Rows>
    </TestStep>
	</TestExecution>

	<TestCleanup>
	<TestStep assemblyPath="BizUnitExtensions.dll" typeName="BizUnit.Extensions.EntLibDBExecuteNonQueryStep">
      <DelayBeforeExecution>0</DelayBeforeExecution>
      <ConfigFileLocation>..\..\Config\db.config</ConfigFileLocation>
      <DatabaseConfigName>AdventureWorks</DatabaseConfigName>
      <SQLQuery>
        <RawSQLQuery>UPDATE [AdventureWorks].[Person].[Address] SET AddressLine1 = '{0}' WHERE AddressId={1}</RawSQLQuery>
        <SQLQueryParams>
			<SQLQueryParam>1970 Napa Ct.</SQLQueryParam>
			<SQLQueryParam>1</SQLQueryParam>
        </SQLQueryParams>
      </SQLQuery>
      </TestStep>
	</TestCleanup>	
	
</TestCase>

